package com.tgu.controller;

import com.tgu.entity.model.CommentEntity;
import com.tgu.service.ICommentService;
import com.tgu.utils.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController()
@RequestMapping("portal/comment")
public class CommentController {

    @Autowired
    private ICommentService commentService;

    @PostMapping("/post")
    public Result postComm(@RequestBody CommentEntity comment) {
        return commentService.insertComment(comment);
    }
}
